<div class="modal-header">
  <button type="button" class="close" ng-click="cancel()">
    <span aria-hidden="true">&times;</span>
  </button>
  <h4 class="modal-title">
    {{'about'|translate}}
  </h4>
</div>

<div class="modal-body">
  <h4 class="text-center">
    <img ng-src="{{app_logo}}" style="display:inline-block;" width="40" /> &nbsp;&nbsp;{{'app.name'|translate}}
    <small class="text-orange">v{{app_version}}</small>

    <div class="pd4" ng-if="custom_about_html" ng-bind-html="custom_about_html"></div>
  </h4>

  <h5 class="text-center">{{'opensource.address'|translate}}: <button class="btn-link" ng-click="open('https://github.com/qiniu/kodo-browser')">https://github.com/qiniu/kodo-browser</button></h5>
  <hr/>

  <div ng-if="isLoading" class="pd2">{{'loading'|translate}}</div>

  <div ng-if="!isLoading" class="pd2">
    <div ng-if="!info.isLastVersion">
      <div class="text-info row">
        <div class="col-md-8">
          {{'foundNewVersion'|translate}}
          <!-- 发现新版本： -->
          v{{info.lastVersion}} &nbsp;&nbsp;&nbsp;&nbsp;
          <a ng-if="!info.upgradeJob || info.upgradeJob.status == 'waiting'" href="" ng-click="startUpgrade()" class="btn btn-sm btn-success">
            <i class="fa fa-download"></i>
            {{'upgrade.start'|translate}}
          </a>
        </div>
        <div class="col-md-2 pull-right" style="margin-right: 20px;">
          <a ng-if="info.upgradeJob && info.upgradeJob.status == 'running'" href="" ng-click="pauseUpgrade()" class="btn btn-sm btn-default">
            <i class="fa fa-download"></i>
            {{'upgrade.pause'|translate}}
          </a>
          <a ng-if="info.upgradeJob && info.upgradeJob.status == 'stopped'" href="" ng-click="startUpgrade()" class="btn btn-sm btn-info">
            <i class="fa fa-download"></i>
            {{'upgrade.continue'|translate}}
          </a>
        </div>
      </div>

      <!-- progress -->
      <div ng-if="info.upgradeJob.status == 'running' || info.upgradeJob.status == 'stopped'" style="margin:4px auto;">
        <!-- 正在下载... -->
        {{'upgrade.downloading'|translate}}
        <div class="progress" style="height:10px">
          <div class="progress-bar progress-bar-info progress-bar-striped" role="progressbar" aria-valuenow="{{info.upgradeJob.progress}}" aria-valuemin="0" aria-valuemax="100" style="width: {{info.upgradeJob.progress}}%">
          </div>
        </div>
      </div>

      <div ng-if="info.upgradeJob.status == 'failed'">
        {{'upgrade.download.failed'|translate}}
        <a href="" ng-click="open(info.link)" class="btn btn-sm btn-primary">
          <i class="fa fa-download"></i>
          {{'clickToDownload'|translate}}
          <!-- 点此下载 -->
        </a>
      </div>

      <div ng-if="info.upgradeJob.status == 'finished'" class="text-center">
        <a href="" ng-click="tryToOpenUpgradePackage(info.localPath)" class="btn btn-success btn-sm">{{'upgrade.download.success'|translate}}</a>
      </div>

      <h5 class="clearfix">
        <!-- 主要更新： -->
        {{'main.upgration'|translate}}:
      </h5>
      <section class="pd4 bg-info" ng-bind-html="info.lastReleaseNote">
      </section>
    </div>

    <div ng-if="info.isLastVersion" class="text-center">
      <span class="text-success">
        {{'currentIsLastest'|translate}}
      </span>
    </div>
  </div>

</div>
